import request from '@/utils/request'

// 查询农事列表
export function listFarming(query) {
  return request({
    url: '/peach/farming/list',
    method: 'get',
    params: query
  })
}

// 查询农事详细
export function getFarming(id) {
  return request({
    url: '/peach/farming/' + id,
    method: 'get'
  })
}

// 新增农事
export function addFarming(data) {
  return request({
    url: '/peach/farming',
    method: 'post',
    data: data
  })
}

// 修改农事
export function updateFarming(data) {
  return request({
    url: '/peach/farming',
    method: 'put',
    data: data
  })
}

// 删除农事
export function delFarming(id) {
  return request({
    url: '/peach/farming/' + id,
    method: 'delete'
  })
}
